package com.theaf.basemodule.common.model;

import com.theaf.core.annotation.FieldCn;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.math.BigInteger;
import java.sql.Timestamp;

/**
 * @Author:songwenke
 * @Description:
 * @Date:create in 14:49 2017/12/21
 * @Modified By:
 **/
@ApiModel("操作日志表")
@Entity
@Table(name = "sys_ope_log")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SysOpeLog {
    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.SEQUENCE,generator = "user_id_req")
    @SequenceGenerator(name = "user_id_req", sequenceName = "sys_req")
    @FieldCn(value = "id")
    private long id;
    @FieldCn(value = "操作对象")
    @Column(name = "oper_object")
    private String operObject;
    @FieldCn(value = "数据id",note = "(其它表的主健)")
    @Column(name = "data_id")
    private Long dataId;
    @FieldCn(value = "动作")
    @Column(name = "action")
    private String action;
    @FieldCn(value = "组号",note = "（由TOKEN+线程ID）")
    @Column(name = "token")
    private String token;
    @FieldCn(value = "资源id")
    @Column(name = "res_id")
    private Long resId;
    @FieldCn(value = "操作模块")
    @Column(name = "mode")
    private String mode;
    @FieldCn(value = "操作人id")
    @Column(name = "ope_id")
    private Long opeId;
    @FieldCn(value = "操作人名称")
    @Column(name = "ope_name")
    private String opeName;
    @FieldCn(value = "请求时间")
    @Column(name = "req_time")
    private Timestamp reqTime;
    @FieldCn(value = "用时",note = "（秒）")
    @Column(name = "use_ts")
    private Integer useTs;
    @FieldCn(value = "操作ip")
    @Column(name = "ope_ip")
    private String opeIp;
    @FieldCn(value = "操作终端")
    @Column(name = "ope_ter")
    private String opeTer;
    @FieldCn(value = "操作类型")
    @Column(name = "oper_type")
    private BigInteger operType;
    @FieldCn(value = "备注")
    @Column(name = "remart")
    private String remart;



}
